<!--
 * @Author: coman
 * @LastEditors: coman
 * @Date: 2020-06-09 17:02:50
 * @motto: No pain,No gain
 * @LastEditTime: 2020-06-09 17:05:45
--> 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   <script>
        var a =[1,2,3,4];
        for(i=0;i<a.length;i++){
            if(a[i]%2===0){
                console.log(a[i]+"是偶数"); 
            }else{
                console.log(a[i]+"是奇数");
            }
        }
   </script>
</body>
</html>